// 获取临时ID

import {v4 as uuidV4} from 'uuid'

export const getUserTempId = ()=>{
    let userTempId = localStorage.getItem('userTempId')
    // 如果没有，则先生成，并在本地存储
    if(!userTempId) {
        userTempId = uuidV4()
        localStorage.setItem('userTempId',userTempId)
    }
    return userTempId
}